#ifndef _SHD_TEXTURE_READER_HLSL_
#define _SHD_TEXTURE_READER_HLSL_

#include "./shd_global.hlsl"
// TODO - reuse texture reading function
/*
float3 tex_read( int x, int w, int y, int h, Texture2D *tex ) {
	float2 coordinate = float2( x / (float) w, y / (float) h );
	return tex->SampleLevel( sampler_point, coordinate, 0 );
};
*/

float3 tex_position_read( int x, int w, int y, int h ) {
	float2 coordinate = float2( x / (float) w, y / (float) h );
	return texture_position.SampleLevel( sampler_point, coordinate, 0 );
};

float3 tex_offset_read( int x, int w, int y, int h ) {
	float2 coordinate = float2( x / (float) w, y / (float) h );
	return texture_offset.SampleLevel( sampler_point, coordinate, 0 );
};

#endif // _SHD_TEXTURE_READER_HLSL_
